import React from 'react';


const Secondkill = (props) => {
    const { seckillArr } = props;
    const listyle = {
        flex: 1,
        listStyle: 'none'
    }

    const formatMoneyFn = (money) => {
        return <span style={{ fontSize: '10px', color: 'red' }}>${money.toFixed(2)}</span>
    }
    return (
        <ul style={{
            display: 'flex',
            marginTop: '20px'
        }}>
            {
                seckillArr.map(item => {
                    return <li key={item.proid} style={listyle}>
                        <img src={item.img1
                        } style={{ width: '100%', height: '100%' }} />
                        <p>{formatMoneyFn(item.originprice)}</p>
                    </li>
                })
            }

        </ul>
    );
}

export default Secondkill;
